package com.woniuxy.cloud.userassembly.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.woniuxy.cloud.userassembly.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 周川雄
 * @since 2022-01-26
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT t1.* FROM `user`  t1  JOIN user_role t2 ON t2.user_id=t1.user_id  JOIN role t3 ON t3.role_id=t2.role_id   ${ew.customSqlSegment} ")
    List<User> listUser(@Param(Constants.WRAPPER) QueryWrapper<User> queryWrapper);


}
